package com.brotherly.framework.transaction;

import java.util.Map;

public class Transaction
{
    protected String id;

    protected String pacemarkType;
    protected String driverType;

    protected Map<String, String> pacemarkProps;
    protected Map<String, String> driverProps;

    protected Party party;

    TransactionTask task;

    public boolean isActive()
    {
        return task != null;
    }

    public void putTask(TransactionTask task)
    {
        this.task = task;
    }

    public TransactionTask getTask()
    {
        return task;
    }

    public void clear()
    {
        id = null;
        pacemarkType = null;
        driverType = null;

        pacemarkProps = null;
        driverProps = null;

        task = null;
    }

    public void putParty(Party party)
    {
        this.party = party;
    }

    public Party getParty()
    {
        return party;
    }

    public void putId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }

    public String getPacemakerType()
    {
        return pacemarkType;
    }

    public void putPacemakerType(String type)
    {
        pacemarkType = type;
    }

    public void putPacemakerProps(Map<String, String> props)
    {
        pacemarkProps = props;
    }

    public String getDriverType()
    {
        return driverType;
    }

    public void putDriverType(String type)
    {
        driverType = type;
    }

    public void putDriverProps(Map<String, String> props)
    {
        driverProps = props;
    }

    public Map<String, String> getPacemakerProps()
    {
        return pacemarkProps;
    }

    public Map<String, String> getDriverProps()
    {
        return driverProps;
    }
}
